package com.itlong.cloud.project.property;

import com.itlong.cloud.POJO.DTO.property.PropertyProjectGetPropertyInfoBrowseStatusDTO;
import com.itlong.cloud.POJO.DTO.property.PropertyProjectGetPropertyInfoDTO;
import com.itlong.cloud.POJO.VO.property.PropertyProjectPropertyInfoBrowseStatusVO;
import com.itlong.cloud.POJO.VO.property.PropertyProjectPropertyInfoVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * <desc>
 *  物业投诉、物业报修、物业通知与便民信息 服务接口协议提供对象.
 * </desc>
 *
 * @createDate 2017-10-16
 */
@FeignClient(name = "project-service")
public interface IPropertyPropertyInfoServiceClient {

    /**
     * <desc>
     *      单条查询 物业信息
     * <desc/>
     *
     * @param propertyInfoId 查询参数
     * @return
     * @author ZiXuan
     * @createDate 2017-12-01
     */
    @RequestMapping(path = "/property/propertyInfo/getOnePropertyInfo",method = {RequestMethod.POST})
    PropertyProjectPropertyInfoVO getOnePropertyInfo(@RequestParam("propertyInfoId") String propertyInfoId) throws Exception;

    /**
     * <desc>
     *      分页获取 物业信息
     * <desc/>
     *
     * @param pageDTO 分页获取 物业信息条件对象
     * @return
     * @author ZiXuan
     * @createDate 2017-10-16
     */
    @RequestMapping(path = "/property/propertyInfo/getPage",method = {RequestMethod.POST})
    Page<PropertyProjectPropertyInfoVO> getPage(@RequestBody PropertyProjectGetPropertyInfoDTO pageDTO) throws Exception;

    /**
     * <desc>
     *      保存 物业信息。
     * <desc/>
     *
     * @param  propertyDTO 请求参数
     * @return
     * @author ZiXuan
     * @createDate 2017-10-26
     */
    @RequestMapping(path = "/property/propertyInfo/savePropertyInfo", method = {RequestMethod.POST})
    Integer savePropertyInfo(@RequestBody PropertyProjectGetPropertyInfoDTO propertyDTO) throws Exception;

    /**
     * <desc>
     *      修改 物业信息。
     * <desc/>
     *
     * @param  propertyDTO 请求参数
     * @return
     * @author ZiXuan
     * @createDate 2017-10-26
     */
    @RequestMapping(path = "/property/propertyInfo/updatePropertyInfo", method = {RequestMethod.POST})
    Integer updatePropertyInfo(@RequestBody PropertyProjectGetPropertyInfoDTO propertyDTO) throws Exception;


    /**
     * <desc>
     *      删除物业信息。
     * <desc/>
     *
     * @param propertyInfoIds 物业信息ID列表
     * @return 返回影响行数
     * @author ZiXuan
     * @createDate 2017-11-02
     */
    @RequestMapping(path = "/property/propertyInfo/deletePropertyInfo", method = {RequestMethod.POST})
    Integer deletePropertyInfo(@RequestParam("propertyInfoIds") String propertyInfoIds) throws Exception;

    /**
     * <desc>
     *      分页获取 物业信息浏览状态
     * <desc/>
     *
     * @param pageDTO 分页获取 物业信息浏览状态条件对象
     * @return
     * @author ZiXuan
     * @createDate 2017-12-21
     */
    @RequestMapping(path = "/property/propertyInfo/getPropertyInfoBrowseStatusPage",method = {RequestMethod.POST})
    Page<PropertyProjectPropertyInfoBrowseStatusVO> getPropertyInfoBrowseStatusPage(@RequestBody PropertyProjectGetPropertyInfoBrowseStatusDTO pageDTO) throws Exception;

    /**
     * <desc>
     *      保存 物业信息浏览状态
     * <desc/>
     *
     * @param  propertyDTO 请求参数
     * @return
     * @author ZiXuan
     * @createDate 2017-12-21
     */
    @RequestMapping(path = "/property/propertyInfo/savePropertyInfoBrowseStatus", method = {RequestMethod.POST})
    Integer savePropertyInfoBrowseStatus(@RequestBody PropertyProjectGetPropertyInfoBrowseStatusDTO propertyDTO) throws Exception;

    /**
     * <desc>
     *      获取投诉记录列表
     * </desc>
     *
     * @param projectId 项目编号
     * @param pageIndex 当前页数(每页15条)
     * @param userId 用户id
     * @return 投诉记录列表
     * @author wangzhi
     * @createDate 2019/06/17
     */
    @RequestMapping(path = "/property/propertyInfo/getComplaintList", method = {RequestMethod.POST})
    Map<String,Object> getComplaintList(@RequestParam("projectId") String projectId, @RequestParam("pageIndex") String pageIndex, @RequestParam("userId") String userId) throws Exception;

    /**
     * <desc>
     *      获取投诉详情
     * </desc>
     *
     * @param msgId 投诉记录ID
     * @return 投诉详情
     * @author wangzhi
     * @createDate 2019/06/17
     */
    @RequestMapping(path = "/property/propertyInfo/getComplaintDetail", method = {RequestMethod.POST})
    Map<String,Object> getComplaintDetail(@RequestParam("msgId") String msgId) throws Exception;
}
